﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditMatrixQuestion.aspx.cs" MasterPageFile="~/Admin/Admin.Master"
    Inherits="Votations.NSurvey.WebAdmin.EditMatrixQuestion"   ValidateRequest="false"%>

<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<asp:content id="Content1" contentplaceholderid="ContentLinkAction" runat="server">
</asp:content>
<asp:content id="Content2" contentplaceholderid="ContentTitle" runat="server">
</asp:content>
<asp:content id="Content3" contentplaceholderid="ContentMain" runat="server">

<LINK href="css/nsurveyadmin.css" type=text/css rel=stylesheet >
<table>
<tr>
<td class="contentCell"  valign="top">
<asp:label id="MessageLabel" runat="server" ForeColor="Green" Visible="False"></asp:label>

 
	<Table Class="Innertext">
	<Tr>
	<Td Colspan="2">
	<Font Class="Titlefont"><asp:Literal id="EditMatrixQuestionTitle" runat="server" EnableViewState="False">Edit matrix question</asp:Literal></Font>
	<Br><Img Src="images/Linebreak.Gif">
	</Td>
	</Tr>
	<Tr>
	<Td>
	&nbsp;&nbsp;
	</Td>
	<Td>
		<Table Class="Innertext" >
        <tr>
          <td colSpan=2><FTB:FreeTextBox id="QuestionFreeTextBox" runat="server" ToolbarStyleConfiguration="Office2000" Height="200px" SupportFolder="~/aspnet_client/FreeTextBox/" BreakMode="LineBreak"></FTB:FreeTextBox></td></tr>
        <tr>
          <td width=160><STRONG><asp:Literal id="MultipleChoicesMatrixLabel" runat="server" EnableViewState="False">Multiple choices matrix :</asp:Literal></STRONG> </td>
          <td width=420><asp:checkbox id=MultipleChoiceCheckbox runat="server"></asp:checkbox></td></tr>
        <tr>
          <td width=160><STRONG><asp:Literal id="AnswerRatingLabel" runat="server" EnableViewState="False">Enable answer rating :</asp:Literal></STRONG> </td>
          <td><asp:checkbox id="RatingCheckbox" runat="server"></asp:checkbox></td></tr>
        <tr>
          <td width=160><STRONG><asp:Literal id="MinSelectionLabel" runat="server" EnableViewState="False">Min. selections required :</asp:Literal></STRONG> </td>
          <td><asp:dropdownlist id=MinSelectionDropDownList runat="server">
				<asp:ListItem Value="1">1</asp:ListItem>
				<asp:ListItem Value="2">2</asp:ListItem>
				<asp:ListItem Value="3">3</asp:ListItem>
				<asp:ListItem Value="4">4</asp:ListItem>
				<asp:ListItem Value="5">5</asp:ListItem>
				<asp:ListItem Value="6">6</asp:ListItem>
				<asp:ListItem Value="7">7</asp:ListItem>
				<asp:ListItem Value="8">8</asp:ListItem>
				<asp:ListItem Value="9">9</asp:ListItem>
				<asp:ListItem Value="10">10</asp:ListItem>
				<asp:ListItem Value="11">11</asp:ListItem>
				<asp:ListItem Value="12">12</asp:ListItem>
				<asp:ListItem Value="13">13</asp:ListItem>
				<asp:ListItem Value="14">14</asp:ListItem>
				<asp:ListItem Value="15">15</asp:ListItem>
				<asp:ListItem Value="16">16</asp:ListItem>
				<asp:ListItem Value="17">17</asp:ListItem>
				<asp:ListItem Value="18">18</asp:ListItem>
				<asp:ListItem Value="19">19</asp:ListItem>
				<asp:ListItem Value="20">20</asp:ListItem>
				</asp:dropdownlist></td></tr>
        <tr>
          <td width=160 nowrap><STRONG><asp:Literal id="MaxSelectionAllowed" runat="server" EnableViewState="False">Max. selections allowed :</asp:Literal></STRONG> </td>
          <td width="480"><asp:dropdownlist id=MaxAllowedDropDownList runat="server">
				<asp:ListItem Value="1">1</asp:ListItem>
				<asp:ListItem Value="2">2</asp:ListItem>
				<asp:ListItem Value="3">3</asp:ListItem>
				<asp:ListItem Value="4">4</asp:ListItem>
				<asp:ListItem Value="5">5</asp:ListItem>
				<asp:ListItem Value="6">6</asp:ListItem>
				<asp:ListItem Value="7">7</asp:ListItem>
				<asp:ListItem Value="8">8</asp:ListItem>
				<asp:ListItem Value="9">9</asp:ListItem>
				<asp:ListItem Value="10">10</asp:ListItem>
				<asp:ListItem Value="11">11</asp:ListItem>
				<asp:ListItem Value="12">12</asp:ListItem>
				<asp:ListItem Value="13">13</asp:ListItem>
				<asp:ListItem Value="14">14</asp:ListItem>
				<asp:ListItem Value="15">15</asp:ListItem>
				<asp:ListItem Value="16">16</asp:ListItem>
				<asp:ListItem Value="17">17</asp:ListItem>
				<asp:ListItem Value="18">18</asp:ListItem>
				<asp:ListItem Value="19">19</asp:ListItem>
				<asp:ListItem Value="20">20</asp:ListItem>
				</asp:dropdownlist></td></tr>
		</Table>	
	</Td>
	</Tr>
	</Table>
	<asp:button id=UpdateQuestionButton runat="server" Text="Update" onclick="UpdateQuestionButton_Click"></asp:button><asp:Button id=ExportXMLButton runat="server" Text="Export XML" onclick="ExportXMLButton_Click"></asp:Button><BR>
<br>

	<Table Class="Innertext">
	<Tr>
	<Td Colspan="2">
	<Font Class="Titlefont"><asp:Literal id="InsertNewTitle" runat="server" EnableViewState="False">Insert a new</asp:Literal></Font>
	<Br><Img Src="images/Linebreak.Gif">
	</Td>
	</Tr>
	<Tr>
	<Td>
	&nbsp;&nbsp;
	</Td>
	<Td>
		<Table Class="Innertext" >
              <tr>
                <td><STRONG><asp:Literal id="RowLabel" runat="server" EnableViewState="False">Row</asp:Literal> </STRONG> </td>
                <td><asp:textbox id=NewRowTextBox runat="server"></asp:textbox></td>
                <td><asp:button id=AddRowButton runat="server" Text="Add row" onclick="AddRowButton_Click"></asp:button></td></tr>
              <tr>
                <td><STRONG><asp:Literal id="ColumnLabel" runat="server" EnableViewState="False">Column</asp:Literal></STRONG> </td>
                <td>
                  <P><asp:textbox id=NewColumnTextBox runat="server"></asp:textbox><asp:dropdownlist id=AnswerTypeDropDownList runat="server"></asp:dropdownlist></P></td>
                <td><asp:button id=AddColumnButton runat="server" Text="Add column" onclick="AddColumnButton_Click"></asp:button></td></tr>
		</Table>	
	</Td>
	</Tr>
	</Table><br>

	<Table Class="Innertext">
	<Tr>
	<Td Colspan="2">
	<Font Class="Titlefont"><asp:Literal id="CurrentRowsColumnsTitle" runat="server" EnableViewState="False">Current rows and columns</asp:Literal></Font>
	<Br><Img Src="images/Linebreak.Gif">
	</Td>
	</Tr>
	<Tr>
	<Td>
	&nbsp;&nbsp;
	</Td>
	<Td>
		<Table Class="Innertext" >
		  <tr>
          <td><asp:datagrid id=RowsDataGrid runat="server" AutoGenerateColumns="False" Width="100%" CellPadding="3" border="0">
				<AlternatingItemStyle BackColor="#F4F9FA">
				</AlternatingItemStyle>

				<ItemStyle BackColor="white" Font-size="xx-small">
				</ItemStyle>

				<HeaderStyle Font-size="xx-small" Font-Bold="True">
				</HeaderStyle>

				<Columns>
				<asp:BoundColumn DataField="QuestionText" HeaderText="Rows"></asp:BoundColumn>
				<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
				<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
				</Columns>
				</asp:datagrid><br>
			</td></tr>
			<tr>
			<td><asp:datagrid id="ColsDataGrid" runat="server" border="0" CellPadding="3" Width="100%" AutoGenerateColumns="False">
				<AlternatingItemStyle BackColor="#F4F9FA">
				</AlternatingItemStyle>

				<ItemStyle BackColor="white" Font-size="xx-small">
				</ItemStyle>

				<HeaderStyle Font-size="xx-small" Font-Bold="True">
				</HeaderStyle>

				<Columns>
				<asp:BoundColumn DataField="AnswerText" HeaderText="Columns"></asp:BoundColumn>
				
				<asp:TemplateColumn HeaderText="Type">
				<ItemTemplate>
				<asp:DropDownList id="TypesDropDownList" runat="server" Enabled="False"></asp:DropDownList>
				</ItemTemplate>
				<EditItemTemplate>
				<asp:DropDownList id="TypesEditDropDownList" runat="server"></asp:DropDownList>
				</EditItemTemplate>
				</asp:TemplateColumn>

				<asp:TemplateColumn HeaderText="Rating">
				<ItemTemplate>
				<asp:Label id="RatingLabel" runat="server"></asp:Label><asp:CheckBox id="RatingPartCheckBox" runat="server" Enabled="False"></asp:CheckBox>
				</ItemTemplate>
				</asp:TemplateColumn>
				
				<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
				
				<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
				
				</Columns>
				</asp:datagrid> 
				</td></tr>
		</Table>	
	</Td>
	</Tr>
	</Table>

</td></tr>
</table></asp:content>
